﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BTalk.Crypto.Algorithms
{
    public class Caesar : ICryptoStrategy
    {
        private const int shiftNumber = 3;

        public byte[] Encode(byte[] message)
        {
            return message.Select(b => (byte)(b + (byte)3)).ToArray();
        }

        public byte[] Decode(byte[] message)
        {
            return message.Select(b => (byte)(b - (byte)3)).ToArray();
        }

        public override string ToString()
        {
            return "Caesar Cipher";
        }

        public dynamic Configuration
        {
            get;
            set;
        }
    }
}
